﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading;


namespace AlertSystem.Dab.LK
{
    public class LkOrdersLoadParser: ILoadParser<LkOrdersAlertItem>
    {
        public LkOrdersAlertItem ParceFrom(object item)
        {
            var dr  = item as DataRow;
            if (dr == null || dr.GetType() != typeof(DataRow)) throw new ArgumentException("item");
            
            return new LkOrdersAlertItem(dr);
        }
        

        public Type GetAlertType()
        {
            return typeof (LkOrdersAlertItem);
        }
    }

  /*  public class OrdersLoadParser : ILoadParser<OrdersAlertItem>
    {
        public OrdersAlertItem ParceFrom(object item)
        {
            var dr = item as DataRow;
            if (dr == null || dr.GetType() != typeof(DataRow)) throw new ArgumentException("item");

            return new OrdersAlertItem(dr);
        }


        public Type GetAlertType()
        {
            return typeof(OrdersAlertItem);
        }
    }*/



}
